package pers.zb.cloud.service.upms.enums;

import lombok.Getter;
import pers.zb.cloud.service.upms.enums.mybatis.BaseEntityEnum;

@Getter
public enum SexEnum implements BaseEntityEnum<SexEnum> {
    MALE(1,"男"),
    FEMALE(2,"女");

    private int code;
    private String value;

    SexEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }

    @Override
    public int getIntValue() {
        return this.code;
    }

    /*public static SexEnum getSexEnumByCode(int code){
        for(SexEnum sexEnum : SexEnum.values()){
            if(code == sexEnum.getCode()){
                return sexEnum;
            }
        }
        return null;
    }*/
}
